<?php
/*
 +----------------------------------------------------------------------
 + Title        : ServiceException 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2019/9/5 21:00
 + Last-time    : 2019/9/5 21:00+ 86187
 + Desc         : ServiceException
 +----------------------------------------------------------------------
*/


namespace app\http\exception;


class ServiceException extends BaseException
{

    /**
     * BaseException constructor.
     *
     * @param mixed $code
     * @param mixed $msg
     */
    public  function __construct($msg = '', $code = 1)
    {
        $this->code = $code;
        if ($msg = $msg ?: self::ERR_MAP[$code]) {
            $this->message = $this->msg = $msg;
        }
    }

}